import hudson.model.*;

def read_yaml_file(yaml_file) {
    def datas = ""
    if (yaml_file.toString().endsWith(".yaml")) {
        datas = readYaml file : yaml_file
    } else {
        datas = readYaml text : yaml_file
    }
    datas.each {
        println (it.key + " = " + it.value)
    }
}

def write_to_yaml(map_data, yaml_path) {
    writeYaml file: yaml_path, data: map_data
}

return this